#ifndef __PARAMETER_H_
#define __PARAMETER_H_

//设备号、设备信道、空调控制方式-IRcode-自定义、工作模式、温控参数、时控参数。
typedef struct {

	unsigned short int DevNum;
//	unsigned short int Channel;
//	unsigned short int AirContronlMode;
//	unsigned short int WorkMode;
//	unsigned short int Temperature_L;
//	unsigned short int Temperature_H;
//	unsigned short int Temp;

	unsigned char  Channel;
	unsigned char  AirContronlMode;
	unsigned char  WorkMode;
	unsigned char  Temperature_L;
	unsigned char  Temperature_H;
	unsigned char  IRUseDefCodeFlag;
	unsigned char  AirCtrlTemp;//保存空调控制温度--红外学习使用。
	unsigned short LocalManualWorkTime;

}Device_Param;


//按照固定的格式来存储，读取固定的长度，通过count来确认那些数据有效
typedef struct {
//	unsigned char count;
		unsigned char StartTime_H[18];
		unsigned char StartTime_M[18];

		unsigned char EndTime_H[18];
		unsigned char EndTime_M[18];
}TimeControl_Param;




//extern TimeControl_Param str_TimeCtrl_Param;
//extern Device_Param str_Device_Param;

//目前Lora接收支持 10节课时控参数。
union uTimeCtrlPara
{
	TimeControl_Param str_TimeCtrlParam;
	unsigned char uc_DevTimeParm[4][18];
};

union uDevicePara
{
	Device_Param str_DeviceParam;
//	unsigned short int ui_DevParm[8];
	unsigned char uc_DevParm[10];
};


typedef struct
{
	unsigned char Year;
	unsigned char Month;
	unsigned char Day;
	unsigned char Hour;
	unsigned char Min;
	unsigned char Sec;
	unsigned char Week;
	
}CurrentTime;

union str_CurrentTime
{
	CurrentTime str_CurrentTime;
	unsigned char tt[7];
};

extern union str_CurrentTime str_DevCurrentTime;

extern union uTimeCtrlPara str_TimeCtrl_Param;
extern union uDevicePara str_Device_Param;

extern unsigned char TimeCtrlCount;
extern unsigned char uc_SetParaStatus;

//typedef struct{
//	unsigned char StartTime_H[12];
//	unsigned char StartTime_M[12];
//
//	unsigned char EndTime_H[12];
//	unsigned char EndTime_M[12];
//	unsigned char count;
//}WorkSchedule;
////extern WorkSchedule str_WorkSchedule;

#endif

